// const baseUrl = "http://localhost:3001"
function http({url,method="get",data}){
	return new Promise((resolve,reject)=>{
		uni.request({
		  // url: baseUrl + url,
		  url,
		  method,
		  data,
		  header:{
			  token:uni.getStorageSync("token_name")
		  },
		  success: (res) => {
		    resolve(res)
		  }, 
		  fail: (err) => {
		    reject(err)
		  },
		});
	})
}

export default http